﻿<%@ Page Language="VB" Debug="true" %>
<%@ Register TagPrefix="wmx" Namespace="Microsoft.Matrix.Framework.Web.UI" Assembly="Microsoft.Matrix.Framework, Version=0.6.0.0, Culture=neutral, PublicKeyToken=6f763c9966660626" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.OleDb" %>
<script runat="server">

    Sub Page_Load()
        Dim ConnectionString As String = ConfigurationSettings.AppSettings("strcnn")
        Dim myConnection As New OleDbConnection(ConnectionString)
        Dim myCommand as New OleDbCommand
        Dim strsql = Request.QueryString("strsql")
        myConnection.Open()
        myCommand.Connection = myConnection
    
        myCommand.CommandText = strsql
        Tabela.DataSource = myCommand.ExecuteReader(CommandBehavior.CloseConnection)
        Tabela.DataBind()
    End Sub

</script>
<html>
<head>
    <link href="imprimir.css" type="text/css" rel="stylesheet" />
</head>
<body leftmargin="0" topmargin="0" arial="arial">
    <table bordercolor="#000000" cellspacing="5" cellpadding="10" width="1000" border="1">
        <tbody>
            <tr>
                <td>
                    <table cellspacing="0" cellpadding="0" width="100%" border="0">
                        <tbody>
                            <tr>
                                <td align="middle">
                                    <strong><font size="4">ZT Representa&ccedil;&otilde;es<br />
                              Comerciais Ltda.</font></strong></td>
                                <td valign="center" align="middle" width="291">
                                    Rua República do Líbano 61/1112<br />
                                    Centro - 20061-030 - Rio de Janeiro - RJ<br />
                                    Tel: (21) 2242-7635 / 2252-9529<br />
                                    Fax: 2252-2852 
                                    <br />
                                    e-mail: ztjolit@bordallo.com.br</td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;<asp:DataGrid id="Tabela" AutoGenerateColumns="False" BorderWidth="1px" BorderColor="Black" CellPadding="2" Width="100%" runat="server">
                        <HeaderStyle font-bold="True"></HeaderStyle>
                        <Columns>
                            <asp:BoundColumn DataField="Cidade" HeaderText="Cidade"></asp:BoundColumn>
                            <asp:BoundColumn DataField="CodigoJolitex" HeaderText="C&#243;d"></asp:BoundColumn>
                            <asp:BoundColumn DataField="RazaoSocial" HeaderText="Raz&#227;o social"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Endereco" HeaderText="Endere&#231;o"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Bairro" HeaderText="Bairro"></asp:BoundColumn>
                            <asp:BoundColumn DataField="CNPJ" HeaderText="CNPJ"></asp:BoundColumn>
                            <asp:BoundColumn DataField="InscricaoEstadual" HeaderText="Inscr Est"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Telefone" HeaderText="Telefone"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Contato" HeaderText="Contato"></asp:BoundColumn>
                            <asp:BoundColumn DataField="Sigla" HeaderText="Vend"></asp:BoundColumn>
                        </Columns>
                    </asp:DataGrid>
                </td>
            </tr>
        </tbody>
    </table>
</body>
</html>
